﻿<Window x:Class="KSACalibrate.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Kinect Screen Aware Calibration" Height="768" Width="1024" Loaded="Window_Loaded">
    <Grid>
        <StackPanel>
            <StackPanel Orientation="Horizontal">
                <!-- Lefmost item-->
                <StackPanel Orientation="Vertical" Name="KinectList" Width="160">
                </StackPanel>
                <!--Center item -->
                <Grid>
                    <Grid Width="640" Height="480" Margin="0" Background="Transparent" Name="DebugGrid"></Grid>
                    <Canvas Margin="0,0,0,0" Background="Transparent" Name="BoundaryCanvas" MouseDown="BoundaryCanvas_MouseDown_1" Width="320" Height="240" HorizontalAlignment="Left" VerticalAlignment="Top">
                        <Canvas.RenderTransform>
                            <ScaleTransform ScaleX="2" ScaleY="2"></ScaleTransform>
                        </Canvas.RenderTransform>
                    </Canvas>                    
                </Grid>
                <!-- rightmost item-->
                <DockPanel Name="ControlsGrid" Margin="10">
                    <StackPanel VerticalAlignment="Stretch">
                        <Slider Orientation="Vertical" 
                                Name="LowDistanceAboveSlider" 
                                Height="270" 
                                Minimum="-10"
                                Maximum="100"
                                TickFrequency="1"
                                IsSnapToTickEnabled="True"
                                ValueChanged="sliderValue_Changed"/>
                        <Label>HighVal</Label>
                        <Label Name="LowDistanceValue">0</Label>
                    </StackPanel>
                    <StackPanel>
                        <Slider Orientation="Vertical" Name="HighDistanceAboveSlider" 
                                Minimum="0"
                                Maximum="100"
                                TickFrequency="1"
                                Height="270"
                                IsSnapToTickEnabled="True"
                                ValueChanged="sliderValue_Changed"/>
                        <Label>LowVal</Label>
                        <Label Name="HighDistanceValue">0</Label>
                    </StackPanel>
                    <StackPanel>
                        <Slider Orientation="Vertical" 
                                Name="MinBlobSizeSlider" 
                                Height="270" 
                                Minimum="0"
                                TickFrequency="1"      
                                IsSnapToTickEnabled="True"
                                Maximum="200"
                                ValueChanged="sliderValue_Changed"/>
                        <Label>Min Blob Pixels</Label>
                        <Label Name="MinBlobSizeValue">0</Label>
                    </StackPanel>                      
                </DockPanel>
            </StackPanel>
            
            <StackPanel>
                <Label Name="PerformanceMetrics">Performance:</Label>
                <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom">
                    <Button Width="100" Click="Save_Click">Save</Button>
                    <Button Width="100" Click="Exit_Click">Exit</Button>
                </StackPanel>
            </StackPanel>
        </StackPanel>
    </Grid>
</Window>
